home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / prgtools / gnustuff / tos / othergnu / gp2st.zoo / diffs
Encoding:
Text File  |  1991-06-06  |  6.5 KB  |  281 lines

  1. diff -c -r orig-gnuplot/command.c gnuplot/command.c
  2. *** orig-gnuplot/command.c    Tue Sep 18 05:56:42 1990
  3. --- gnuplot/command.c    Sun Jun  2 06:20:24 1991
  4. ***************
  5. *** 51,56 ****
  6. --- 51,59 ----
  7.   
  8.   #endif /* MSDOS */
  9.   
  10. + #ifdef GNU_READLINE
  11. + #include <readline/readline.h>
  12. + #endif
  13.   
  14.   #include "plot.h"
  15.   #include "setshow.h"
  16. ***************
  17. *** 108,113 ****
  18. --- 111,120 ----
  19.   char replot_line[MAX_LINE_LEN+1] = "";
  20.   static int plot_token;                    /* start of 'plot' command */
  21.   
  22. + #ifdef GNU_READLINE
  23. + static char *input_line_ptr = (char *)NULL;
  24. + #endif
  25.   com_line()
  26.   {
  27.       read_line(PROMPT);
  28. ***************
  29. *** 1130,1150 ****
  30.   }
  31.   
  32.   #else /* MSDOS */
  33. !         /* plain old Unix */
  34.   
  35.   read_line(prompt)
  36.       char *prompt;
  37.   {
  38.       int start = 0;
  39.       BOOLEAN more;
  40.       int last = 0;
  41.   
  42.       if (interactive)
  43.        fputs(prompt,stderr);
  44.       do {
  45.          /* grab some input */
  46.          if ( fgets(&(input_line[start]), MAX_LINE_LEN - start, stdin) 
  47.                   == (char *)NULL ) {
  48.             /* end-of-file */
  49.             if (interactive)
  50.               (void) putc('\n',stderr);
  51. --- 1137,1187 ----
  52.   }
  53.   
  54.   #else /* MSDOS */
  55. !         /* plain old Unix + Atari ST */
  56.   
  57.   read_line(prompt)
  58.       char *prompt;
  59.   {
  60. + #ifdef GNU_READLINE
  61. +     char *input_line_ptr = (char*)NULL;
  62. +     char *curr_prompt = prompt;
  63. +     char *more_prompt = "> ";
  64. + #endif
  65.       int start = 0;
  66.       BOOLEAN more;
  67.       int last = 0;
  68.   
  69. + #ifndef GNU_READLINE        /* One prompt is enough.    */
  70.       if (interactive)
  71.        fputs(prompt,stderr);
  72. + #endif
  73. + #ifdef GNU_READLINE
  74.       do {
  75. +     /* If the buffer has already been allocated, free it */
  76. +     if (input_line_ptr != (char *)NULL)
  77. +         free (input_line_ptr);
  78. +         /* grab some input and put non-blank lines in the history list */
  79. +     input_line_ptr = readline (curr_prompt);
  80. +     if (input_line_ptr == (char *)EOF)
  81. +         input_line_ptr = (char *)NULL;
  82. +     if (input_line_ptr && *input_line_ptr)
  83. +         add_history (input_line_ptr);
  84. +     /* copy readline's input buffer to gnuplot's */
  85. +     if (input_line_ptr)
  86. +         strcpy (&(input_line[start]), input_line_ptr);
  87. +     if (input_line_ptr == (char *)NULL) {
  88. + #else /* GNU_READLINE */
  89. +     do {
  90.          /* grab some input */
  91.          if ( fgets(&(input_line[start]), MAX_LINE_LEN - start, stdin) 
  92.                   == (char *)NULL ) {
  93. + #endif /* GNU_READLINE */
  94.             /* end-of-file */
  95.             if (interactive)
  96.               (void) putc('\n',stderr);
  97. ***************
  98. *** 1172,1178 ****
  99. --- 1209,1219 ----
  100.               more = FALSE;
  101.          }
  102.           if (more && interactive)
  103. + #ifdef GNU_READLINE
  104. +         curr_prompt = more_prompt;
  105. + #else
  106.           fputs("> ", stderr);
  107. + #endif /* GNU_READLINE */
  108.       } while(more);
  109.   }
  110.   
  111. diff -c -r orig-gnuplot/internal.c gnuplot/internal.c
  112. *** orig-gnuplot/internal.c    Tue Mar 27 00:01:26 1990
  113. --- gnuplot/internal.c    Sun Jun  2 04:41:32 1991
  114. ***************
  115. *** 47,52 ****
  116. --- 47,53 ----
  117.    * System V and MSC 4.0 call this when they wants to print an error message.
  118.    * Don't!
  119.    */
  120. + #ifndef atarist
  121.   #ifdef MSDOS
  122.   #ifdef __TURBOC__
  123.   int matherr()    /* Turbo C */
  124. ***************
  125. *** 57,62 ****
  126. --- 58,66 ----
  127.   #else /* MSDOS */
  128.   int matherr()
  129.   #endif /* MSDOS */
  130. + #else /* atarist */
  131. + int matherr(struct exception *x)
  132. + #endif /* atarist */
  133.   {
  134.       return (undefined = TRUE);        /* don't print error message */
  135.   }
  136. Only in gnuplot: makefile.st
  137. diff -c -r orig-gnuplot/plot.h gnuplot/plot.h
  138. *** orig-gnuplot/plot.h    Mon Mar 26 23:59:10 1990
  139. --- gnuplot/plot.h    Sun Jun  2 04:21:08 1991
  140. ***************
  141. *** 44,49 ****
  142. --- 44,54 ----
  143.   #define FALSE 0
  144.   
  145.   
  146. + #ifdef atarist            /* Grab the definition of cmplx in     */
  147. +                 /* pmluser.h (aka. math.h)         */
  148. + #include <math.h>
  149. + #endif /* atarist */
  150.   #define Pi 3.141592653589793
  151.   
  152.   
  153. ***************
  154. *** 191,200 ****
  155.       LEFT, CENTRE, RIGHT
  156.   };
  157.   
  158.   struct cmplx {
  159.       double real, imag;
  160.   };
  161.   
  162.   struct value {
  163.       enum DATA_TYPES type;
  164. --- 196,206 ----
  165.       LEFT, CENTRE, RIGHT
  166.   };
  167.   
  168. + #ifndef atarist                /* Def'ed in math.h.        */
  169.   struct cmplx {
  170.       double real, imag;
  171.   };
  172. ! #endif /* atarist */
  173.   
  174.   struct value {
  175.       enum DATA_TYPES type;
  176. Only in gnuplot: readme.st
  177. diff -c -r orig-gnuplot/term.c gnuplot/term.c
  178. *** orig-gnuplot/term.c    Tue Sep 18 05:59:25 1990
  179. --- gnuplot/term.c    Sun Jun  2 04:10:10 1991
  180. ***************
  181. *** 412,417 ****
  182. --- 412,421 ----
  183.   #include "term/x11.trm"
  184.   #endif /* X11 */
  185.   
  186. + #ifdef ATARIST                    /* Atari ST screen.    */
  187. + #include "term/atari.trm"
  188. + #endif
  189.   /* Dummy functions for unavailable features */
  190.   
  191.   /* change angle of text.  0 is horizontal left to right.
  192. ***************
  193. *** 919,924 ****
  194. --- 923,936 ----
  195.          X11_linetype, X11_put_text, null_text_angle, 
  196.          X11_justify_text, do_point, do_arrow}
  197.   #endif
  198. + #ifdef ATARIST
  199. +     ,{ST_TERM_NAME, "Atari ST monochrome high-res screen",
  200. +         0, 0, 0, 0, ST_VTIC, ST_HTIC,
  201. +         ST_init, ST_reset, ST_text, null_scale, ST_graphics,
  202. +         ST_move,ST_vector,ST_linetype, ST_put_text, ST_text_angle,
  203. +         ST_justify_text, line_and_point, do_arrow}
  204. + #endif /* ATARIST */
  205.   };
  206.   
  207.   #define TERMCOUNT (sizeof(term_tbl)/sizeof(struct termentry))
  208. ***************
  209. *** 1032,1043 ****
  210.          term_name = vms_init();
  211.   #endif
  212.          
  213. ! #ifdef SUN
  214.          term = getenv("TERM");    /* try $TERM */
  215.          if (term_name == (char *)NULL
  216.             && term != (char *)NULL && strcmp(term, "sun") == 0)
  217.           term_name = "sun";
  218. ! #endif /* sun */
  219.   
  220.   #ifdef UNIXPC
  221.              if (iswind() == 0) {
  222. --- 1044,1058 ----
  223.          term_name = vms_init();
  224.   #endif
  225.          
  226. ! #if defined(SUN) || defined(atarist)
  227.          term = getenv("TERM");    /* try $TERM */
  228.          if (term_name == (char *)NULL
  229.             && term != (char *)NULL && strcmp(term, "sun") == 0)
  230.           term_name = "sun";
  231. !        if (term_name == (char *)NULL
  232. !           && term != (char *)NULL && strcmp(term, "atari") == 0)
  233. !         term_name = "atari";
  234. ! #endif /* sun || atarist */
  235.   
  236.   #ifdef UNIXPC
  237.              if (iswind() == 0) {
  238. diff -c -r orig-gnuplot/term.h gnuplot/term.h
  239. *** orig-gnuplot/term.h    Tue Sep 18 05:59:21 1990
  240. --- gnuplot/term.h    Sun Jun  2 05:30:22 1991
  241. ***************
  242. *** 35,41 ****
  243.    */
  244.   
  245.   /* These terminals are not relevant for MSDOS */
  246. ! #ifndef MSDOS
  247.   
  248.   #define AED         /* AED 512 and AED 767 */
  249.   #define BITGRAPH    /* BBN BitGraph */
  250. --- 35,41 ----
  251.    */
  252.   
  253.   /* These terminals are not relevant for MSDOS */
  254. ! #if !defined(MSDOS) && !defined(atarist)
  255.   
  256.   #define AED         /* AED 512 and AED 767 */
  257.   #define BITGRAPH    /* BBN BitGraph */
  258. ***************
  259. *** 83,86 ****
  260. --- 83,90 ----
  261.   #define CORONA      /* Corona graphics 325 */
  262.   #define HERCULES    /* IBM PC/Clone with Hercules graphics board */
  263.   #endif
  264. + #endif
  265. + #ifdef atarist
  266. + #define ATARIST
  267.   #endif
  268. Only in gnuplot/term: atari.trm
  269.